﻿/**********************************************************************
 * @file   GUIGeometryBoxDialog.h
 * @brief  长方体
 * @author guqingtao (15598887859@163.com)
 * @date   2025-09-15
 *********************************************************************/
#ifndef GUIGEOMETRYBOXDIALOG_H
#define GUIGEOMETRYBOXDIALOG_H

#include "FITK_Kernel/FITKCore/FITKAbstractGUIDialog.h"
#include "GUIGeometryDialogAPI.h"
#include "PickDataProvider/GUIPickInfo.h"

namespace Ui { class GUIGeometryBoxDialog; }
namespace Interface {
    class FITKAbsGeoCommand;
    class FITKGeoCommandList;
}
namespace Core
{
    class FITKActionOperator;
}
namespace GUI {
    /**
     * @brief  创建长方体
     * @author guqingtao (15598887859@163.com)
     * @date   2025-09-15
     */
    class GUIGeometryDialogAPI GUIGeometryBoxDialog : public Core::FITKDialog
    {
        Q_OBJECT

    public:

        GUIGeometryBoxDialog(Interface::FITKAbsGeoCommand* obj,Core::FITKActionOperator* oper,QWidget* parent = nullptr);
        ~GUIGeometryBoxDialog();
    private:
        /**
         * @brief    初始化
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-09-15
         */
        void init();
        /**
         * @brief    处理拾取到的数据
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-09-15
         */
        void pickFinishedOper();
        /**
         * @brief    设置拾取方式
         * @param[i] objType
         * @param[i] methodType
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-09-16
         */
        void enablePickSig(GUI::GUIPickInfo::PickObjType objType, GUI::GUIPickInfo::PickMethod methodType);
        /**
         * @brief    创建数据
         * @return   bool
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-09-16
         */
        bool createObjData();
        /**
         * @brief    编辑数据
         * @return   bool
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-09-16
         */
        bool editObjData();
        /**
         * @brief    从界面获取数据
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-09-16
         */
        void getDataFormWidget();
    private slots:
        /**
         * @brief  OK按钮
         * @author guqingtao (15598887859@163.com)
         * @date   2025-09-15
         */
        void on_pushButton_OK_clicked();
        /**
         * @brief    取消按钮
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-09-15
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief    拾取点的按钮
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-09-15
         */
        void on_point1_pick_clicked();
    private:
        /**
         * @brief  ui
         * @author guqingtao (15598887859@163.com)
         * @date   2025-09-15
         */
        Ui::GUIGeometryBoxDialog *_ui{};
        /**
         * @brief  几何数据对象
         * @author guqingtao (15598887859@163.com)
         * @date   2025-09-15
         */
        Interface::FITKAbsGeoCommand* _obj{};
        /**
         * @brief  操作器
         * @author guqingtao (15598887859@163.com)
         * @date   2025-09-15
         */
        Core::FITKActionOperator* _oper{};
        /**
         * @brief  几何数据管理器
         * @author guqingtao (15598887859@163.com)
         * @date   2025-09-15
         */
        Interface::FITKGeoCommandList* _geometryData{};
        /**
         * @brief  数据ID
         * @author guqingtao (15598887859@163.com)
         * @date   2025-09-15
         */
        int _objID = -1;
        /**
         * @brief  是否创建
         * @author guqingtao (15598887859@163.com)
         * @date   2025-09-16
         */
        bool _isCreate = false;
    };
}
#endif 
